package com.zhipu.balance.ui.home.revise

import android.os.Bundle
import androidx.lifecycle.ViewModelProvider
import com.zhipu.balance.R
import com.zhipu.balance.databinding.ActivityReviseBinding
import com.zhipu.balance.ui.BaseActivity
import com.zhipu.balance.ui.vm.home.revise.ReviseModel
import com.zhipu.balance.utils.InitializeUtils

/**
 * 天平校正
 */
class ReviseActivity : BaseActivity<ActivityReviseBinding>(){


    //VM
    var reviseModel: ReviseModel? = null

    override fun initCreate() {
        super.initCreate()
        InitializeUtils.AppComponent()?.doInjectionMain(this)
        reviseModel = ViewModelProvider(this, viewModelFactory)[ReviseModel::class.java]
    }

    /**
     * 初始化根布局
     *
     * @return 布局layout的id
     */
    override fun initContentView(savedInstanceState: Bundle?): Int {
        return R.layout.activity_revise
    }

    override fun initView() {
        super.initView()
        binding.viewModel = reviseModel
        /**
         * 每隔milliseconds毫秒后执行next操作
         */
        reviseModel?.milliseconds()
    }





}